<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts/header :: head('错误 - 监控工具平台')">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误 - 监控工具平台</title>
    <link rel="stylesheet" href="/monitoring/css/element-ui.css">
    <link rel="stylesheet" href="/monitoring/css/custom.css">
</head>
<body>
    <!-- 使用公共头部 -->
    <div th:replace="layouts/header :: header"></div>

    <div id="app" class="container">
        <el-card class="box-card">
            <div slot="header" class="clearfix">
                <span>发生错误</span>
            </div>
            <div>
                <el-alert
                    title="操作失败"
                    type="error"
                    description="系统在处理您的请求时遇到了问题。"
                    show-icon>
                </el-alert>
                
                <div style="margin-top: 20px;">
                    <p><strong>错误信息：</strong> <span th:text="${error}">未知错误</span></p>
                    
                    <div style="margin-top: 20px;">
                        <el-button type="primary" @click="goBack">返回上一页</el-button>
                        <el-button @click="goHome">返回首页</el-button>
                    </div>
                </div>
            </div>
        </el-card>
    </div>

    <script src="/monitoring/js/vue.min.js"></script>
    <script src="/monitoring/js/element-ui.js"></script>
    <script>
        new Vue({
            el: '#app',
            methods: {
                goBack() {
                    window.history.back();
                },
                goHome() {
                    window.location.href = '/';
                }
            }
        });
    </script>
</body>
</html> 